package y2015.date0916am.多线程聊天室.TcpClient;

import java.util.Calendar;
import java.util.GregorianCalendar;

public class DateAndTime {

    private String dateAndTime;

    public String getDateAndTime() {
        Calendar calend = new GregorianCalendar();
        dateAndTime = calend.get(Calendar.MONTH) + "月" + calend.get(Calendar.DAY_OF_MONTH)
                + "日 " + calend.get(Calendar.HOUR_OF_DAY) + ":" + calend.get(
                Calendar.MINUTE) + ":" + calend.get(Calendar.SECOND);
        return dateAndTime;
    }
}

